colors.py

Provides helper functions for pretty-printing with colors. This file is borrowed from the Cuckoo Sandbox Project: https://github.com/cuckoosandbox/cuckoo

bashfuscator.common.colors.color(text, colorCode)[source]

Colorize input text, on supported terminals.

Parameters:
  • text – text to color
  • color_code – color to colorize text
Returns:

colorized text

bashfuscator.common.colors.black(text)[source]

Returns black text on supported terminals.

bashfuscator.common.colors.red(text)[source]

Returns red text on supported terminals.

bashfuscator.common.colors.green(text)[source]

Returns green text on supported terminals.

bashfuscator.common.colors.yellow(text)[source]

Returns yellow text on supported terminals.

bashfuscator.common.colors.blue(text)[source]

Returns blue text on supported terminals.

bashfuscator.common.colors.magenta(text)[source]

Returns magenta text on supported terminals.

bashfuscator.common.colors.cyan(text)[source]

Returns cyan text on supported terminals.

bashfuscator.common.colors.white(text)[source]

Returns white text on supported terminals.

bashfuscator.common.colors.bold(text)[source]

Returns bold text on supported terminals.